import axios from "./http.js";
const api = {};

// 登录页面接口
//登录
api.Login = params => {
  return axios({
    url: "/login",
    method: "POST",
    data: params
  });
};
//退出
api.Logout = params => {
  return axios({
    url: "/logout",
    method: "GET",
    params: params
  });
};

// 首页接口
//获取首页数据
api.Main = params => {
  return axios({
    url: "/main",
    method: "POST",
    data: params
  });
};

// 管理员模块接口
//获取账号咧表
api.userAdminList = params => {
  return axios({
    url: "/userAdminList",
    method: "POST",
    data:params
  });
};
//删除账号列表
api.userAdminDel = params => {
  return axios({
    url: "/userAdminDel",
    method: "POST",
    data:params
  });
};
//获取角色咧表
api.roleAdminList = params => {
  return axios({
    url: "/roleAdminList",
    method: "POST",
    data:params
  });
};
//删除角色列表
api.roleAdminDel = params => {
  return axios({
    url: "/roleAdminDel",
    method: "POST",
    data:params
  });
};
//获取可选择角色咧表
api.roleAdminOption = params => {
  return axios({
    url: "/roleAdminOption",
    method: "POST",
    data: params
  });
};
//添加角色
api.roleAdminAdd = params => {
  return axios({
    url: "/roleAdminAdd",
    method: "POST",
    data:params
  });
};
//获取角色详情
api.roleAdminInfo = params => {
  return axios({
    url: "/roleAdminInfo",
    method: "POST",
    data:params
  });
};
//获取后台菜单
api.menuAdminList = params => {
  return axios({
    url: "/menuAdminList",
    method: "POST",
    data:params
  });
};
//修改角色
api.roleAdminSave = params => {
  return axios({
    url: "/roleAdminSave",
    method: "POST",
    data: params
  });
};
//删除菜单
api.menuAdminDel = params => {
  return axios({
    url: "/menuAdminDel",
    method: "POST",
    data:params
  });
};
//删除菜单
api.menuAdminInfo = params => {
  return axios({
    url: "/menuAdminInfo",
    method: "POST",
    data:params
  });
};

// 设置模块接口
//获取设置
api.RedactGet = params =>{
  return axios({
    url: "/configList",
    method: "POST",
    data: params
  });
}
//编辑设置
api.RedactSet = params =>{
  return axios({
    url: "/configSave",
    method: "POST",
    data: params
  });
}

// 公告模块接口
//获取公告列表
api.noticeList = params => {
  return axios({
    url: "/noticeList",
    method: "GET",
    params: params
  });
};
//添加公告列表
api.noticeAdd = params => {
  return axios({
    url: "/noticeAdd",
    method: "POST",
    data: params
  });
};
//编辑公告列表
api.noticeSave = params => {
  return axios({
    url: "/noticeSave",
    method: "POST",
    data: params
  });
};
//获取公告详情
api.noticeInfo = params => {
  return axios({
    url: "/noticeInfo",
    method: "GET",
    params: params
  });
};
//删除公告列表
api.noticeDel = params => {
  return axios({
    url: "/noticeDel",
    method: "GET",
    params: params
  });
};

// 订单模块接口
//获取订单列表
api.orderList = params => {
  return axios({
    url: "/orderList",
    method: "GET",
    params:params
  });
};

// 幻灯片模块接口
//获取幻灯片列表
api.bannerlist = params => {
  return axios({
    url: "/bannerlist",
    method: "GET",
    params:params
  });
};
//添加幻灯片列表
api.bannerAdd = params => {
  return axios({
    url: "/bannerAdd",
    method: "POST",
    data:params
  });
};
//修改幻灯片列表
api.bannerSave = params => {
  return axios({
    url: "/bannerSave",
    method: "POST",
    data:params
  });
};
//删除幻灯片列表
api.del_banner = params => {
  return axios({
    url: "/bannerDel",
    method: "GET",
    params:params
  });
};
//获取幻灯片详情
api.bannerInfo = params => {
  return axios({
    url: "/bannerInfo",
    method: "GET",
    params:params
  });
};

// 审核模块接口
//获取审核列表
api.applyList = params => {
  return axios({
    url: "/applyList",
    method: "GET",
    params:params
  });
};
//是否审核成功
api.applyCheck = params => {
  return axios({
    url: "/applyCheck",
    method: "POST",
    data:params
  });
};

// 会员模块接口
//获取会员列表
api.memberList = params => {
  return axios({
    url: "/memberList",
    method: "GET",
    params:params
  });
};
//获取会员详情
api.memberInfo = params => {
  return axios({
    url: "/memberInfo",
    method: "GET",
    params: params
  });
};
//修改会员状态
api.memberStatus = params => {
  return axios({
    url: "/memberStatus",
    method: "GET",
    params:params
  });
};

// 文章模块接口
//文章分类列表
api.articleCateList = params => {
  return axios({
    url: "/articleCateList",
    method: "GET",
    params:params
  });
};
//添加文章分类
api.articleCateAdd = params => {
  return axios({
    url: "/articleCateAdd",
    method: "POST",
    data:params
  });
};
//修改文章分类
api.articleCateSave = params => {
  return axios({
    url: "/articleCateSave",
    method: "POST",
    data:params
  });
};
//删除文章分类
api.articleCateDel = params => {
  return axios({
    url: "/articleCateDel",
    method: "GET",
    params: params
  });
};
//文章分类详情
api.articleCateInfo = params => {
  return axios({
    url: "/articleCateInfo",
    method: "GET",
    params:params
  });
};
//文章分类名字列表
api.getArticleCate = params => {
  return axios({
    url: "/getArticleCate",
    method: "GET",
    params:params
  });
};
//文章列表
api.articleList = params => {
  return axios({
    url: "/articleList",
    method: "GET",
    params:params
  });
};
//添加文章
api.articleAdd = params => {
  return axios({
    url: "/articleAdd",
    method: "POST",
    data:params
  });
};
//修改文章
api.articleSave = params => {
  return axios({
    url: "/articleSave",
    method: "POST",
    data:params
  });
};
//删除文章
api.articleDel = params => {
  return axios({
    url: "/articleDel",
    method: "GET",
    params:params
  });
};
//文章详情
api.articleInfo = params => {
  return axios({
    url: "/articleInfo",
    method: "POST",
    data:params
  });
};

// 课程接口模块
//课程分类列表
api.courseCateList = params => {
  return axios({
    url: "/courseCateList",
    method: "GET",
    params:params
  });
};
//分类下的课程列表
api.getCoursecateCourse = params => {
  return axios({
    url: "/getCoursecateCourse",
    method: "GET",
    params:params
  });
};
//分类列表名
api.getCoursecateList = params => {
  return axios({
    url: "/getCoursecateList",
    method: "GET",
    params: params
  });
};
//添加课程分类
api.courseCateAdd = params => {
  return axios({
    url: "/courseCateAdd",
    method: "POST",
    data:params
  });
};
//修改课程分类
api.courseCateSave = params => {
  return axios({
    url: "/courseCateSave",
    method: "POST",
    data:params
  });
};
//删除课程 分类
api.courseCateDel = params => {
  return axios({
    url: "/courseCateDel",
    method: "GET",
    params:params
  });
};
//课程分类详情
api.courseCateInfo = params => {
  return axios({
    url: "/courseCateInfo",
    method: "GET",
    params:params
  });
};

// 课程管理接口
//课程列表
api.courseList = params => {
  return axios({
    url: "/courseList",
    method: "GET",
    params:params
  });
};
//课程分类名
api.getCoursecateList = params => {
  return axios({
    url: "/getCoursecateList",
    method: "GET",
    params:params
  });
};
//直播用户列表
api.anchorList = params => {
  return axios({
    url: "/anchorList",
    method: "GET",
    params:params
  });
};
//添加课程
api.courseAdd = params => {
  return axios({
    url: "/courseAdd",
    method: "POST",
    data:params
  });
};
//删除课程
api.courseDel = params => {
  return axios({
    url: "/courseDel",
    method: "POST",
    data:params
  });
};
//获取课程详情
api.courseInfo = params => {
  return axios({
    url: "/courseInfo",
    method: "POST",
    data:params
  });
};
//编辑课程
api.courseSave = params => {
  return axios({
    url: "/courseSave",
    method: "POST",
    data:params
  });
};
//课程=用户下的直播间列表
api.courseLiveList = params => {
  return axios({
    url: "/courseLiveList",
    method: "GET",
    params:params
  });
};

//直播管理接口

// 直播间列表
api.liveroomList = params => {
  return axios({
    url: "/liveroomList",
    method: "GET",
    params:params
  });
};
// 添加直播间列表
api.liveroomAdd = params => {
  return axios({
    url: "/liveroomAdd",
    method: "POST",
    data:params
  });
};
// 同步直播间列表
api.syncRoomlist = params => {
  return axios({
    url: "/syncRoomlist",
    method: "GET",
    params:params
  });
};
// 直播间列表详情
api.liveroomInfo = params => {
  return axios({
    url: "/liveroomInfo",
    method: "GET",
    params:params
  });
};
// 直播间列表中的课程名详情
api.liveCourseList = params => {
  return axios({
    url: "/liveCourseList",
    method: "POST",
    data:params
  });
};
// 视频列表接口
api.videoList = params => {
  return axios({
    url: "/videoList",
    method: "GET",
    params:params
  });
};
// 登录背景图
api.getLoginInfo = params => {
  return axios({
    url: "/getLoginInfo",
    method: "GET",
    params:params
  });
};
// 会员加入的课程列表
api.memberCourse = params => {
  return axios({
    url: "/memberCourse",
    method: "GET",
    params:params
  });
};
// 会员直播的课程列表
api.memberLivecourse = params => {
  return axios({
    url: "/memberLivecourse",
    method: "GET",
    params:params
  });
};
// 修改菜单名称
api.menuAdminSave = params => {
  return axios({
    url: "/menuAdminSave",
    method: "POST",
    data:params
  });
};
// 获取菜单列表
api.getmenulist = params => {
  return axios({
    url: "/getmenulist",
    method: "GET",
    params:params
  });
};


export default api;
